#include<bits/stdc++.h>
using namespace std;
signed main() {
//	system("start https://www.lanqiao.cn/problems/2271/learning/");

    vector<int> days = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

    int ans = 0, week = 6;
    for(int i = 1; i <= 12; i++) {
        for(int j = 1; j <= days[i]; j++) {
            if(!week || week == 6) ans++;
            else if(j % 10 == 1) ans++;
            week = (week + 1) % 7;
        }
    }
	cout << ans;

    return 0;
}

